<template>
  <!-- 隐患处理 处理-->
  <view class="pwd-retrieve-container">
    <view class="hidden-title">隐患信息</view>
    <view class="background-white">
      <view class="bor-btm"
        >隐患编码：<text>{{ detail.managerCode || '--' }}</text></view
      >
      <view class="bor-btm"
        >隐患位置：<text>{{ detail.location || '--' }}</text></view
      >
      <view class="bor-btm"
        >所属部门：<text>{{ detail.deptName || '--' }}</text></view
      >
      <view class="bor-btm"
        >隐患类型：<text>{{ detail.managerTypeLabel || '--' }}</text></view
      >
      <view class="bor-btm">
        隐患级别：<text>{{ detail.managerLevelLabel || '--' }}</text>
      </view>
      <view class="bor-btm" v-if="detail.managerLevelLabel === '重大隐患'">
        重大隐患判定依据：<text>{{ detail.majorManagerCriteria || '--' }}</text>
      </view>
      <view class="bor-btm">
        隐患描述：<text>{{ detail.managerDesc || '--' }}</text>
      </view>
      <view class="bor-btm"
        >上报人：<text>{{ detail.reportPersonName || '--' }}</text>
      </view>
      <view class="bor-btm"
        >上报时间：<text>{{ detail.createTime || '--' }}</text></view
      >
      <view class="bor-btm" style="display: block">
        相关照片
        <image-upload state="view" :imageUrl="detail.reportPhotoUrl"></image-upload>
      </view>
    </view>

    <view class="hidden-title mt-20">隐患审核信息</view>
    <view class="background-white">
      <view class="bor-btm">
        审核时间：<text>{{ detail.reviewTime || '--' }}</text>
      </view>
      <view class="bor-btm">
        审核人员：<text>{{ detail.actualReviewPersonName || '--' }}</text>
      </view>
    </view>

    <view class="hidden-title mt-20">隐患审批信息</view>
    <view class="background-white">
      <view class="bor-btm">
        审批时间：<text>{{ detail.approveTime || '--' }}</text>
      </view>
      <view class="bor-btm">
        审批人员：<text>{{ detail.actualApprovePersonName || '--' }}</text>
      </view>
    </view>

    <view class="hidden-title mt-20">隐患整改信息</view>
    <view class="background-white">
      <view class="bor-btm">
        整改时间：<text>{{ detail.actualDealTime || '--' }}</text>
      </view>
      <view class="bor-btm">
        整改部门：<text>{{ detail.actualDealDeptName || '--' }}</text>
      </view>
      <view class="bor-btm">
        整改人员：<text>{{ detail.actualChargePersonName || '--' }}</text>
      </view>
      <view class="bor-btm">
        整改资金：<text>{{ detail.dealMoney || '--' }}</text>
      </view>

      <view class="bor-btm">
        整改要求：<text>{{ detail.dealRequire || '--' }}</text>
      </view>

      <view class="bor-btm">
        监控措施：<text>{{ detail.emergencyPlan || '--' }}</text>
      </view>

      <view class="bor-btm">
        整改内容：<text>{{ detail.dealContent || '--' }}</text>
      </view>

      <view class="bor-btm" style="display: block">
        整改照片：
        <image-upload state="view" :imageUrl="detail.managerPhotoUrl" />
      </view>
    </view>

    <view class="hidden-title mt-20">隐患验收信息</view>
    <view class="background-white">
      <view class="bor-btm">
        验收时间：<text>{{ detail.actualAcceptanceTime || '--' }}</text>
      </view>
      <view class="bor-btm">
        验收部门：<text>{{ detail.actualAcceptanceDeptName || '--' }}</text>
      </view>
      <view class="bor-btm">
        验收人员：<text>{{ detail.actualAcceptancePersonName || '--' }}</text>
      </view>
      <view class="bor-btm">
        验收结果：<text>{{ detail.acceptanceResult || '--' }}</text>
      </view>
      <view class="bor-btm" style="display: block">
        验收照片：
        <image-upload state="view" :imageUrl="detail.acceptancePhotoUrl"></image-upload>
      </view>
    </view>
  </view>
</template>

<script>
import { getHiddenDangerDetail } from '@/api/dbd/hiddenDangerBook'
import ImageUpload from '@/components/image-upload/index.vue'

export default {
  components: {
    ImageUpload
  },
  data() {
    return {
      detail: {}
    }
  },
  onLoad({ managerId }) {
    getHiddenDangerDetail(managerId).then((res) => {
      this.detail = res.data
    })
  },
  methods: {}
}
</script>

<style lang="scss">
.pwd-retrieve-container {
  .background-white {
    background-color: #fff;
    padding: 0rpx 0rpx 0rpx 30rpx;

    view {
      padding: 14rpx 0;

      text {
        color: #333;
      }
    }

    .bor-btm {
      border-bottom: 1px solid #d5d7e3;
      padding: 24rpx 0;
      padding-right: 24rpx;
      color: #999;
    }

    .photo {
      display: flex;
      justify-content: space-between;

      image {
        width: 214rpx;
        height: 214rpx;
      }
    }
  }
}

.hidden-title {
  background: #f5f5f5;
  padding: 20rpx;
  color: #999;
}

.bor-top {
  border-top: 20rpx solid #f5f5f5;
}
</style>
